package com.example.apps

import com.example.lib_base.BaseViewModel
import com.example.lib_base.Res
import com.example.lib_base.UIIntent
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.Flow
import javax.inject.Inject
@HiltViewModel
class AppsViewModel @Inject constructor(private val appsReop: AppsReop):BaseViewModel<AppsIntent>() {
    override fun handleIntent(it: UIIntent) {
        when(it){
            is AppsIntent.GetApps -> {
                httpRequest(appsReop.getApps()as Flow<Res<Any>>)
            }
        }
    }
}